<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<jsp:include page="/jsp/loginCheck.jsp" />
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Usuários</title>
	<link href="../css/estiloframes.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" href="../css/blue.css" type="text/css" id="" media="print, projection, screen" />
	<link rel="stylesheet" href="../css/jquery.tablesorter.pager.css" type="text/css" id="" media="print, projection, screen" />
	
	<style type="text/css">
		<!--
		body {
			background-color: #FFFFFF;
		}
		-->
	</style>
	
	<script type="text/javascript" src="../js/jquery-latest.js"></script>
	<script type="text/javascript" src="../js/jquery.tablesorter.js"></script>
	<script type="text/javascript" src="../js/jquery.tablesorter.pager.js"></script>
	<script type="text/javascript">
	$(document).ready(function() {
		$("#table").tablesorter({
			headers: {5: {sorter: false}},
			widgets: ['zebra']
		}).tablesorterPager({container: $("#pager")});
	}); 
	</script>
</head>

<body>
	<div id="corpo">
		<br />
		<p class="titulo_texto">Manutenção de Usuários</p>
		
		<div style="padding-left:10px;padding-right:10px;">
			<div>
				<table id="table" class="tablesorter" align="center" width="620" border="0" cellpadding="4" cellspacing="4">
					<thead>
						<tr class="header" align="center">
							<th>Usuário&nbsp;</th>
							<th>E-Mail&nbsp;</th>
							<th>Senha &nbsp;</th>
							<th>Perfil&nbsp;</th>
							<th>Cód.Pesquisador&nbsp;</th>
							<th>&nbsp;</th>
						</tr>
					</thead>
					<tbody>
						<s:iterator value="listUsers" status="listUsersStatus">
							<tr>
								<td><div id="text"><s:property value="usuario"/></div></td>
								<td><div id="text"><s:property value="email"/></div></td>
								<td><div id="text"><s:property value="senha"/></div></td>
								<td><div id="text"><s:property value="perfil"/></div></td>
								<td><div id="text"><s:property value="codigo_usuario"/></div></td>
								<td>
									<a href="<s:url action='deleteUser'><s:param name="user.id" value="%{id}"/></s:url>" ><img src="../images/btn/excluir.png" border="0" alt="Excluir" style="cursor:pointer;" /></a> 
									<a href="<s:url action='editUser'><s:param name="user.id" value="%{id}"/></s:url>"><img src="../images/btn/atualizar.png" border="0" alt="Atualizar" style="cursor:pointer;" /></a>
									<s:if test="status >= 1"><a href="<s:url action='statusUser'><s:param name="user.status" value="%{status}"/><s:param name="user.id" value="%{id}"/></s:url>"><img src="../images/btn/aceitar.png" border="0" alt="Ativar" style="cursor:pointer;" /></a></s:if><s:else><a href="<s:url action='statusUser'><s:param name="user.status" value="%{status}"/><s:param name="user.id" value="%{id}"/></s:url>"><img src="../images/btn/bloquear.png" border="0" alt="Suspender" style="cursor:pointer;" /></a></s:else>
					      		</td>
							</tr>
						</s:iterator>									
					</tbody>					
				</table>
				 <div id="pager" class="pager">
					<form>
						<img src="../images/icons/first.png" class="first"/>
						<img src="../images/icons/prev.png" class="prev"/>
						<input type="text" class="pagedisplay" disabled="disabled"/>
						<img src="../images/icons/next.png" class="next"/>
						<img src="../images/icons/last.png" class="last"/>
						<select class="pagesize" disabled="true">
							<option selected="selected"  value="5">5</option>																				
						</select>
					</form>
				</div>
			</div>
			<br />					
		</div>			  		  
	</div>
</body>
</html>
